package Arraylist;

import java.util.ArrayList;

public class arraylist{
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>();
        list.add("apple");
        list.add("banana");
        list.add("orange");
        list.add("grape");
        System.out.println(list.get(0));
        list.set(0, "pear");

    }
}
